<html>
  <head>
    <title>ConArtist - Getting Started</title>
    <link rel="stylesheet" type="text/css" href="css/style.css" />
  </head>
  <body>
    <div id="document">
      <div id="header">
        <h1>ConArtist - Getting Started</h1>
        <ul>
          <li><a href="index.html">Home</a></li>
          <li><a href="overview.html">Overview</a></li>
          <li>Design Documentation</li>
          <li><a href="api/">API Documentation</a></li>
        </ul>
      </div>
      <div id="content">
<p>ConArtist is configured using XML configuration files. The aim is to make the configuration easy but allow as much flexability as possible.</p>
<h2>Simplest Configuration</h2>
<p>The simplest configuration case is where ConArtist is used to serve pages from a location on the hard drive, much as is possible using the basic Apache httpd configuration. This isn't something that we would reccomend, but it provides a useful starting point as it should be familiar to most people. The configuration file is shown below.</p> 
<pre>
&lt;?xml version="1.0"?&gt;
&lt;conArtistConfiguration&gt;
  &lt;Generator id="localhost"&gt;
    &lt;Host&gt;
      &lt;Hostname&gt;localhost&lt;/Hostname&gt;
      &lt;Port&gt;80&lt;/Port&gt;
      &lt;Port&gt;8080&lt;/Port&gt;
    &lt;/Host&gt;
    &lt;Mapping&gt;
      &lt;Match&gt;
        &lt;Path&gt;/&lt;/Path&gt;
        &lt;File&gt;*&lt;/File&gt;
      &lt;/Match&gt;
      &lt;Output&gt;
        &lt;Filename&gt;/usr/websites/test$(REQUEST)&lt;/Filename&gt;
      &lt;/Output&gt;
  &lt;/Generator&gt;
&lt;/conArtistConfiguration&gt;
</pre>
<ul>
  <li>The Generator section acts as a container for all configuration items that relate to a particular site. The id attribute is used to identify this site. There can be as many of these sections as required.</li>
  <li>The Host section provides information that is used to determine which site should handle the request. In this example any requests to localhost on port 80 or 8080 will be handled using this generator.</li>
  <li>The Mapping section allows us to detrmine how requested URL's are transformed into files to be served. In this case it simply sets the filename to be returned
      </div>
      <div id="footer">
        <p>&copy; 2007</p>
      </div>
    </div>
  </body>
</html>
